<template>
  <div class="ol-page">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      @prev-click="handleCurrentChange"
      @next-click="handleCurrentChange"
      :current-page="ipagination.current"
      :page-sizes="ipagination.pageSizeOptionsN"
      :page-size="ipagination.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="ipagination.total"
    >
    </el-pagination>
  </div>
</template>
<script>
export default {
  name: 'PAGINATION',
  data: () => {
    return {}
  },
  props: {
    ipagination: { type: Object, required: true }
  },
  mounted() {},
  methods: {
    handleCurrentChange(val) {
      this.$emit('handleCurrentChange', val)
    },
    handleSizeChange(val) {
      this.$emit('handleSizeChange', val)
    }
  }
}
</script>
<style scoped>
.ol-page {
  margin-top: 13px;
}
</style>
